package com.qf.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 *@ClassName Resource
 *@Author jiangjiajia
 *@JDK-Version 1.8
 *@Date 2021/7/10 3:35 pm
 *@Version 1.0
 *@Description 必须描述类的业务用途
 
 **/

/**
 * 资源表
 */
@ApiModel(value = "com-qf-entity-Resource")
@Data
@TableName(value = "`resource`")
public class Resource {
    /**
     * 主键
     */
    @TableId(value = "resource_id", type = IdType.INPUT)
    @ApiModelProperty(value = "主键")
    private Long resourceId;

    /**
     * 父id
     */
    @TableField(value = "parent_id")
    @ApiModelProperty(value = "父id")
    private Long parentId;

    /**
     * 资源名称
     */
    @TableField(value = "resource_name")
    @ApiModelProperty(value = "资源名称")
    private String resourceName;

    /**
     * 资源类型(0、目录 1、菜单 2、按钮)
     */
    @TableField(value = "resource_type")
    @ApiModelProperty(value = "资源类型(0、目录 1、菜单 2、按钮)")
    private Byte resourceType;

    /**
     * 请求地址
     */
    @TableField(value = "url")
    @ApiModelProperty(value = "请求地址")
    private String url;

    /**
     * 权限标识码
     */
    @TableField(value = "code")
    @ApiModelProperty(value = "权限标识码")
    private String code;

    /**
     * 排序
     */
    @TableField(value = "sort")
    @ApiModelProperty(value = "排序")
    private Integer sort;

    public static final String COL_RESOURCE_ID = "resource_id";

    public static final String COL_PARENT_ID = "parent_id";

    public static final String COL_RESOURCE_NAME = "resource_name";

    public static final String COL_RESOURCE_TYPE = "resource_type";

    public static final String COL_URL = "url";

    public static final String COL_CODE = "code";

    public static final String COL_SORT = "sort";
}